package com.hopu.springbootdemo2.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @PreAuthorize("hasAuthority('添加采购单')")
    @RequestMapping("/tjcg")
    public String tjcg(){
        return "添加采购单";
    }

    @PreAuthorize("hasAuthority('删除采购单')")
    @RequestMapping("/sccg")
    public String sccg(){
        return "删除采购单";
    }

    @RequestMapping("/gxcg")
    public String gxcg(){
        return "更新采购单";
    }

    @RequestMapping("/cxcg")
    public String cxcg(){
        return "查询采购单";
    }

    @RequestMapping("/cxsp")
    public String cxsp(){
        return "查询商品";
    }

    @RequestMapping("/sjsp")
    public String sjsp(){
        return "上架商品";
    }
}
